<include file="Public/ADMIN/HTML/Admin_header/admin_first_head.html"/>
<title>教师管理{$Think.const.TITLE}</title>
<include file="Public/ADMIN/HTML/Admin_header/admin_css_and_js.html"/>
<include file="Public/ADMIN/HTML/Admin_header/admin_title.html"/>
<include file="Public/ADMIN/HTML/Admin_header/admin_middle_list.html"/>
<include file="Public/ADMIN/HTML/Left_list/teacher_left_list.html"/>
<script>
	function delTech(id){
		var delTr = document.getElementById(id);                              // 获取动态的表格ID
		address = "{$Think.const.DOMAIN_NAME}Admin/Users/teacherdele/id/"+id; // 设置$.get调用路径
		$.get(address,function(str){
			if(str==0){
				ZENG.msgbox.show("删除成功！", 4, 1000);
				delTr.parentNode.removeChild(delTr);                                   // 删除该行
			}else{
				ZENG.msgbox.show("删除失败！该教师可能存在已发布的创意，不能够删除。", 5, 2000);
			}
		});
	}
</script>
	<div class="container-fluid main-content">
		
		<!-- DataTables Example -->
		<div class="row">
			<div class="col-lg-10">
				<div class="widget-container fluid-height clearfix">
					<div class="heading">
						<i class="icon-plus-sign-alt"></i>教师列表
					</div>
					<div class="widget-content padded clearfix">
						<table class="table table-bordered table-striped" id="dataTable1">
							<thead>
								<th style="width: 7%;text-align: center">
                                编号
                            </th>
								<th class="hidden-xs" style="width:7%;text-align: center;">头像</th>
								<th style="width:20%;text-align: center;">用户名</th>
								<th style="width:20%;text-align: center;">姓名</th>
								<th class="hidden-xs" style="width:20%;text-align: center;">邮箱</th>
								<th class="hidden-xs" style="width:20%;text-align: center;">电话</th>
								
								<th style="text-align: center;">操作</th>
							</thead>
							<tbody>
								<assign name="num" value="1"/>
								<volist name="in" id="vo">
								<tr id="{$vo.uid}">
									<td style="text-align: center;">{$num++}</td>
									 <td style="text-align: center">
				                        <img src="{$Think.const.RESOURCES}UPLOADS/photo/{$vo.photo}" style="width: 30px;height:30px;"/> 
				                      </td>
									<td style="text-align: center">{$vo.username}</td>
									<td style="text-align: center" class="hidden-xs">{$vo.realname}</td>
									<td style="text-align: center" class="hidden-xs">{$vo.email}</td>
									<td style="text-align: center" class="hidden-xs">{$vo.phone}</td>
									
									<td class="actions" style="width: 8%;text-align: center">
									
										<div class="action-buttons" style="margin:0 0 0 -19px">
										<!--	<a class="table-actions"
												onclick="if(confirm('确定要将 {$vo.realname} 老师提升为管理员吗?')==false)return false;"
											    href="{$Think.const.DOMAIN_NAME}Admin/Users/modifyPermissions/id/{$vo.uid}/name/{$vo.realname}">
											    <i class="icon-eye-open"  title="升级为管理员"></i></a>
												
										-->
											<a class="table-actions" 
											    href="{$Think.const.DOMAIN_NAME}Admin/Users/teacherModify/id/{$vo.uid}">
												<i class="icon-pencil" title="修改"></i></a>
											<a class="table-actions" 
												onclick="if(confirm('确定删除 {$vo.realname} 老师吗?')==false){ return false; }else { javascript:delTech({$vo.uid}) }" 
												href="javascript:void(0);"> 
												<i class="icon-trash" title="删除"></i></a>
										</div>
									</td>
								</tr>

								</volist>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
		<!-- end DataTables Example -->
	</div>
</div>
</body>

</html>